import 'package:flutter/material.dart';

class MyStackLayout extends StatelessWidget{
  @override
    Widget build(BuildContext context) {
      // TODO: implement build
      return  Scaffold(
          appBar: AppBar(
            title: Text("Stack重叠widget"),
          ),
          body: Center(
            child: Stack(
                alignment: Alignment(1.0,0.5),
            children: <Widget>[
              Container(
                height: 200,
                width: 200,
                alignment: Alignment.center,
                decoration: BoxDecoration(
                  color: Colors.lightBlue
                ),
                child: Text("我是底层widget"),
              ),
              SizedBox(
                width: 50,
                height: 50,
                child: Container(
                alignment: Alignment.center,
                  decoration: BoxDecoration(                    
                    borderRadius: BorderRadius.circular(20),
                    color: Colors.amberAccent                
                  ),
                  child: Text("第二层"),
                ),
              )
            ],
          ),
          ),
        );
     
    }
}